<a href="<?php echo $this->baseUrl("/index/logout"); ?>">Thoát</a>
|
<a href="<?php echo $this->baseUrl("/index/edit"); ?>">Sửa</a>
|
<a href="<?php echo $this->baseUrl("/index/delete"); ?>">Xoá chat</a>
|
<a href="<?php echo $this->baseUrl("/index/story"); ?>">Viết truyện</a>
|
<a href="<?php echo $this->baseUrl("/index/rstory"); ?>">Đọc truyện</a>
|
<a href="<?php echo $this->baseUrl("/index/leoteo"); ?>">Linh tinh</a>
|<br/>
<?php
$this->headTitle('Default - index');
$form = new Zend_Form();
$form->setAction('save')->setMethod('post');
$form->setAttrib('id', 'frmMain');

//$options = array('value' => $values);
//$txtContent = new Zend_Form_Element_Textarea('txtContent', $options);
//$form->addElement($txtContent);

$form->addElement('text', 'txtSend');
$form->addElement('submit', 'btnSend', array('label' => 'Gởi/Nhận'));

echo "Chào: $this->fullName1!<br/>";
echo "Thời gian: $this->loginTime<br/>";
echo "Chat với: $this->fullName2<br/>";
if ($this->contents != NULL) {
    foreach ($this->contents as $value) {
        $user = $value['UserId1'];
        $postTime = $value['PostTime'];
        //$postTime = substr($postTime, 11);
        if ($user == $this->user1)
            echo "[$postTime $user]: " . $value['Content'] . "<br/>";
        elseif ($user == $this->user2)
            echo '<span style="color:#F00">' . "[$postTime  $user]: " . $value['Content'] . '</span><br/>';
    }
}
echo $form;